function Person (sex) {
  this.sex = sex
}
Person.prototype.getSex = function () {
  console.log(`my gender is ${this.sex}`)
}

function Student (id, name, sex) {
  Person.call(this, sex)
  this.id = id
  this.name = name
  this.sex = sex
}
Student.prototype = new Person()
Student.prototype.constructor = Student
Student.prototype.sayHi = function () {
  console.log(`hi~, my name is ${this.name}, my number is ${this.id}, my gender is ${this.sex}`)
}

let s1 = new Student(1, 'niko', 'man')
console.log(s1)
